﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MailConvExample._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="../App_Themes/Main/styles.css" />
    <title>Mail Converter usage example</title>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <table width="800" align="center">
        <tr>
            <td class="frame">
                <div>
                    <div class="header">
                        &nbsp;1. Select file
                    </div>
                    <br />
                    File name:&nbsp;<asp:FileUpload ID="FileUpload1" runat="server" Width="700px" />
                    &nbsp;<!-- <asp:RegularExpressionValidator ID="FileUpLoadValidator" runat="server" ErrorMessage="Upload HTML Mailuments only."
            ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.jpg|.JPG|.gif|.GIF)$"
            ControlToValidate="FileUpload1">
        </asp:RegularExpressionValidator> --></div>
                <p>
                    <asp:Label ID="Label1" runat="server"></asp:Label>
                </p>
                <div class="header">
                    &nbsp;2. Set convert options
                </div>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Convert to" CssClass="caption"></asp:Label>
                            <asp:RadioButtonList ID="rblConvert" runat="server" RepeatColumns="2" Width="258px"
                                BackColor="#FFFFCC" BorderColor="#6699FF" BorderStyle="Solid" BorderWidth="1px">
                                <asp:ListItem Value="htm">html</asp:ListItem>
                                <asp:ListItem Selected="True">rtf</asp:ListItem>
                                <asp:ListItem>tiff</asp:ListItem>
                                <asp:ListItem>txt</asp:ListItem>
                                <asp:ListItem>pdf</asp:ListItem>
                                <asp:ListItem>doc</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                        <td width="32">
                            &nbsp;
                        </td>
                        <td valign="top">
                            <asp:Label ID="Label4" runat="server" Text="Fields to export" 
                                CssClass="caption"></asp:Label>
                            <table style="background-color: #FFFFCC; border: 1px solid #6699FF">
                                <tr>
                                    <td colspan="2">
                                        <asp:CheckBoxList ID="cblFields" runat="server" RepeatColumns="2">
                                            <asp:ListItem>Sender</asp:ListItem>
                                            <asp:ListItem>Recipient</asp:ListItem>
                                            <asp:ListItem Value="CC">CC (Copy to)</asp:ListItem>
                                            <asp:ListItem>Date</asp:ListItem>
                                            <asp:ListItem>Subject</asp:ListItem>
                                            <asp:ListItem>Body</asp:ListItem>
                                            <asp:ListItem Value="images">Include attached images</asp:ListItem>
                                            <asp:ListItem>Attachements</asp:ListItem>
                                        </asp:CheckBoxList>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td colspan="2">
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <table>
                                            <tr>
                                                <td valign="middle">
                                                    <asp:HyperLink ID="HyperLink1" runat="server" 
                                                        NavigateUrl="http://www.coolutils.com/CommandLine/TotalMailConverter" 
                                                        Target="_blank">Additional</asp:HyperLink>
                                                </td>
                                                <td valign="middle">
                                                    <asp:TextBox ID="edAdditional" runat="server"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <p>
                </p>
                <asp:Button ID="bnConvert" runat="server" OnClick="bnConvert_Click" Text="Upload &amp; Convert" />
            </td>
        </tr>
        <tr>
          <td>
            <table width="100%">
              <tr><td colspan=2>&nbsp;</td></tr>            
              <tr>
                <td>Registration key file:</td>
                <td><asp:FileUpload ID="edRegFile" runat="server" width="600px"/>
                    </td>
              </tr>
              <tr><td colspan=2>&nbsp;</td></tr>
              <tr><td>                
                <asp:Button ID="bnRegister" runat="server" OnClick="bnRegister_Click" Text="Register" /></td><td>
                  <asp:Label ID="lbRegisterStatus" runat="server" Text="Label" Visible="False"></asp:Label>
            </td></tr>
            </table>
          </td>
        </tr>
    </table>
    </form>
</body>
</html>
